package com.jfl.scheduler;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

import com.jfl.system.SysSessionService;

/**
 * 
 *  
 * @author  赵炎
 * @version  [V1.00, 2019年2月13日]
 * @see  [相关类/方法]
 * @since V1.00
 */
@Component
public class DeleteExpireSessionTask
{
    private static final Logger LOG = LoggerFactory.getLogger(DeleteExpireSessionTask.class);
    
    @Autowired
    private SysSessionService sysSessionService;
    
    
    /** 
     * 上一次结束后60s执行一次
     */
    @Scheduled(fixedDelay= 60000)
    public void run()
    {
        LOG.info("==> 【定时任务】 删除过期会话对象开始");
        this.sysSessionService.deleteExpireSession();
        LOG.info("==> 【定时任务】 删除过期会话对象结束");
    }
}
